hand-in-hand with these two, and tells Apache in which order to
apply the filters.</p>
<p>The usage of these directives is:</p>
<div class="example"><p><code>
Allow from <var>address</var>
</code></p></div>
<p>where <var>address</var> is an IP address (or a partial IP
address) or a fully qualified domain name (or a partial domain
name); you may provide multiple addresses or domain names, if
desired.</p>
<p>For example, if you have someone spamming your message
board, and you want to keep them out, you could do the
following:</p>
<div class="example"><p><code>
Deny from 10.252.46.165
</code></p></div>
<p>Visitors coming from that address will not be able to see
the content covered by this directive. If, instead, you have a
machine name, rather than an IP address, you can use that.</p>
<div class="example"><p><code>
Deny from <var>host.example.com</var>
</code></p></div>
<p>And, if you'd like to block access from an entire domain,
you can specify just part of an address or domain name:</p>
<div class="example"><p><code>
Deny from <var>192.168.205</var><br />
Deny from <var>phishers.example.com</var> <var>moreidiots.example</var><br />
Deny from ke
</code></p></div>
<p>Using <code class="directive"><a href="../mod/mod_authz_host.html#order">Order</a></code> will let you
be sure that you are actually restricting things to the group that you want
to let in, by combining a <code class="directive"><a href="../mod/mod_authz_host.html#deny">Deny</a></code> and an <code class="directive"><a href="../mod/mod_authz_host.html#allow">Allow</a></code> directive:</p>
<div class="example"><p><code>
Order deny,allow<br />
Deny from all<br />
Allow from <var>dev.example.com</var>
</code></p></div>
<p>Listing just the <code class="directive"><a href="../mod/mod_authz_host.html#allow">Allow</a></code>
directive would not do what you want, because it will let folks from that
host in, in addition to letting everyone in. What you want is to let
<code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code> and <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> which
contain some more information about how this all works.
<code class="module"><a href="../mod/mod_authn_alias.html">mod_authn_alias</a></code> can also help in simplifying certain
authentication configurations.</p>
<p>See the <a href="auth.html">Authentication and Authorization</a>
howto.</p>
</div></div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/howto/access.html" title="English"> en </a></p>
</div><div id="footer">
<p class="apache">Copyright 1995-2006 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>